export default
{
	template:`
	<h1>商品信息</h1>
	<div>
	商品编号:{{id}}
	商品名称:{{name}}
	</div>
	`,
	data(){
		return{
			id:0,
			name:"",
			goods:{
				1:"小米手机",
				2:"华为手机"
			}
		}
	},
	created(){
		console.log("商品详情 created() 组件创建了");
		console.log("路由传递过来的信息:"+this.$route)
		console.log("路由传递过来的信息:"+this.$route.query)
		console.log("路由传递过来的信息:"+this.$route.params)
		console.log(this.$route.params.id)
		this.id=this.$route.params.id
		this.name = this.goods[this.id]
		
		
	}
	
}